package com.wu.d1;

public class test {
    public static void main(String[] args) {
        swimming s1 = new swimming() {
            @Override
            public void swim() {
                System.out.println("swim dog");
            }
        };
        go(s1);
    }

    public static void go(swimming s) {
        System.out.println("go----------");
        s.swim();
    }
}



interface swimming{
    void swim();
}